    <div class="toppage">
    	<span class="left">
        	<select style="width: 130px;" id="action">
            	<option value="1">Action</option>
                <option value="delete">Delete</option>
                <option value="pending">Pending</option>
                <option value="active">Active</option>
            </select>
            <input onclick="$('[name=action]').val($('#action').val()); $('#action_form').submit()" value="Apply" class="btn" type="button">
        	<font class="number">(<?php echo $this->album_model->count_by('status', 'yes'); ?>)</font> <a href="<?php echo current_url(); ?>/?status=active"><font color="#0b9901">Active</font></a><font class="line">|</font><font class="number">(<?php echo $this->album_model->count_by('status', 'no'); ?>)</font> <a href="<?php echo current_url(); ?>/?status=pending"><font color="#c60001">Pending</font></a>
        </span>
        <span class="btnadd">
        <a onclick="open_form('<?php echo action_link('add'); ?>')" href="javascript:void(0)">Add new Gallery</a>
        </span>
    </div>
    <div class="tableout">
    
    	<form method="post" action="<?php echo action_link('do_action'); ?>" id="action_form">

		<div class="title1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" type="checkbox"></div>
            <div class="column" style="width: 2%;">No</div>
            <div class="column" style="width: 6%;">Gallery ID</div>
            <div class="column" style="width: 20%;">Gallery name</div>
            <div class="column" style="width: 38%;">Tour Code</div>
            <div class="column" style="width: 10%;">Date</div>
            <div class="column" style="width: 16%;">Posted by</div>
            <div class="column" style="width: 6%;">Status</div>
        </div>
        
        <?php if(count($albums) > 0): ?>
        <?php $limit = $this->config->item('album', 'limit'); ?>
        <?php foreach($albums as $i => $album): ?>
        <div class="linecate2">
        	<div class="column" style="width: 2%;"><input name="id[]" value="<?php echo $album->id; ?>" type="checkbox" /></div>
            <div class="column" style="width: 2%;"><?php echo ($page - 1)*$limit + $i + 1; ?></div>

            <div class="column" style="width: 6%;">
            	<a href="javascript:;" class="art"><?php echo $album->id; ?></a><br>
            </div>
            
            <div id="row_<?php echo $album->id; ?>">
            
            <div class="column" style="width: 20%;" onmouseover="Hovercat('<?php echo $album->id; ?>')" onmouseout="Outcat('<?php echo $album->id; ?>')">
            	<a href="javascript:;" class="art"><?php echo $album->name; ?></a>
                <div class="action" id="neocat-<?php echo $album->id; ?>">
                    <img src="<?php echo img_link('edit.gif', 'admin'); ?>"><a href="javascript:void(0)" onclick="open_form('<?php echo action_link('edit/'.$album->id); ?>')">Edit</a><img src="<?php echo img_link('delete.gif', 'admin'); ?>"><a href="javascript:void(0)" onclick="album_delete('<?php echo $album->id; ?>')"><font color="#be0000">Delete</font></a>
                </div>
            </div>
            <div class="column" style="width: 38%;">
            	<?php echo $this->album_model->get_tours_code($album->id); ?>
            </div>
            <div class="column" style="width: 10%;"><font class="date"><?php echo date('d-m-Y', strtotime($album->date_create)); ?></font></div>
            <div class="column" style="width: 16%;"><font class="date"><?php echo $album->user_create; ?></font></div>
            <div class="column" style="width: 6%;">
            <?php if($album->status == 'no'): ?>
			<a href="javascript:void(0);" onclick="album_status('<?php echo $album->id; ?>', 'yes')"><img src="<?php echo img_link('pending.png', 'admin'); ?>" class="icon png" title="Active" alt="Active"></a>
            <?php else: ?>
			<a href="javascript:void(0);" onclick="album_status('<?php echo $album->id; ?>', 'no')"><img src="<?php echo img_link('active.png', 'admin'); ?>" class="icon png" title="Pending" alt="Pending"></a>
            <?php endif; ?>
            </div>
            
            </div>
        </div>
		<?php endforeach; ?>
		<?php endif; ?>

        <div class="bottom1">
        	<div class="column" style="width: 2%;"><input class="check_all" onclick="check_all(this)" value="" type="checkbox"></div>
            <div class="column" style="width: 50%;">
            	<select style="width: 130px;" id="action_name" name="action">
                    <option value="">Action</option>
                    <option value="delete">Delete</option>
                    <option value="pending">Pending</option>
                    <option value="active">Active</option>
                </select>
                <input value="Apply" class="btn" type="submit">
            </div>
            <span class="right1">
            	
                <div class="pagination">
                	
                    <ul>
                    <?php echo $pagnav; ?>
                    </ul>
                </div>
            </span>
        </div>
        
        </form>
        
    </div>

<script>
$('#action_form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		load_content('album_list', '<?php echo current_link(); ?>', true);
    	}
    	else show_error('div_message', msg)
    }
});
</script>